#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_coolkey_cpp.dpatch by  <rousseau@imac.maison.bogus>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Closes: #455658 FTBFS with GCC 4.3: #define redefined

@DPATCH@
diff -urNad coolkey-1.1.0~/src/coolkey/coolkey.cpp coolkey-1.1.0/src/coolkey/coolkey.cpp
--- coolkey-1.1.0~/src/coolkey/coolkey.cpp	2007-02-14 20:54:01.000000000 +0100
+++ coolkey-1.1.0/src/coolkey/coolkey.cpp	2008-01-06 14:12:35.000000000 +0100
@@ -34,7 +34,9 @@
 #include "cky_base.h"
 #include "params.h"
 
+#ifndef NULL
 #define NULL 0
+#endif
 
 /* static module data --------------------------------  */
 
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_log_cpp.dpatch by  <rousseau@imac.maison.bogus>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix for g++ 4.3

@DPATCH@
diff -urNad coolkey-1.1.0~/src/coolkey/log.cpp coolkey-1.1.0/src/coolkey/log.cpp
--- coolkey-1.1.0~/src/coolkey/log.cpp	2007-02-14 20:54:01.000000000 +0100
+++ coolkey-1.1.0/src/coolkey/log.cpp	2008-01-06 14:18:11.000000000 +0100
@@ -17,6 +17,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  * ***** END COPYRIGHT BLOCK *****/
 
+#include <stdlib.h>
+#include <string.h>
 #include <string>
 #include "mypkcs11.h"
 #include <assert.h>
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_machdep_cpp.dpatch by  <rousseau@imac.maison.bogus>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix for g++ 4.3

@DPATCH@
diff -urNad coolkey-1.1.0~/src/coolkey/machdep.cpp coolkey-1.1.0/src/coolkey/machdep.cpp
--- coolkey-1.1.0~/src/coolkey/machdep.cpp	2007-02-14 01:46:28.000000000 +0100
+++ coolkey-1.1.0/src/coolkey/machdep.cpp	2008-01-06 14:19:04.000000000 +0100
@@ -17,6 +17,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  * ***** END COPYRIGHT BLOCK *****/
 
+#include <stdlib.h>
+#include <string.h>
 #include "machdep.h"
 #include "mypkcs11.h"
 #include "PKCS11Exception.h"
#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_object_cpp.dpatch by  <rousseau@imac.maison.bogus>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix for g++ 4.3

@DPATCH@
diff -urNad coolkey-1.1.0~/src/coolkey/object.cpp coolkey-1.1.0/src/coolkey/object.cpp
--- coolkey-1.1.0~/src/coolkey/object.cpp	2007-02-09 19:53:21.000000000 +0100
+++ coolkey-1.1.0/src/coolkey/object.cpp	2008-01-06 14:22:42.000000000 +0100
@@ -17,6 +17,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  * ***** END COPYRIGHT BLOCK *****/
 
+#include <string.h>
 #include "mypkcs11.h"
 #include "PKCS11Exception.h"
 #include "object.h"
#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_slot_cpp.dpatch by  <rousseau@imac.maison.bogus>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix for g++ 4.3

@DPATCH@
diff -urNad coolkey-1.1.0.obsolete.0.590099710113467~/src/coolkey/slot.cpp coolkey-1.1.0.obsolete.0.590099710113467/src/coolkey/slot.cpp
--- coolkey-1.1.0.obsolete.0.590099710113467~/src/coolkey/slot.cpp	2008-01-06 14:27:32.000000000 +0100
+++ coolkey-1.1.0.obsolete.0.590099710113467/src/coolkey/slot.cpp	2008-01-06 14:27:58.000000000 +0100
@@ -33,7 +33,7 @@
 
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 
-using std::auto_ptr;
+//using std::auto_ptr;
 
 
 #ifdef DEBUG
